package Year22_Month06.day28;

import java.util.Scanner;

public class 字符串中找出连续最长的数字串 {

    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        String s = sc.nextLine();
        int pre = 0;//最长子数组前指针
        int ord = 0;//最长子数组后指针
        for (int i = 0; i < s.length(); i++) {
            if(s.charAt(i) >= 48 && s.charAt(i) <= 57){
                int left = i;
                while(i < s.length() && s.charAt(i) >= 48 && s.charAt(i) <= 57){
                    i++;
                }
                if(i - left > ord - pre){
                    pre = left;
                    ord = i;
                }
            }
        }
        System.out.println(s.substring(pre,ord));
    }
}
